package com.zsummer.baikal.system.service.impl;

import com.zsummer.baikal.system.entity.SysMenu;
import com.zsummer.baikal.system.mapper.SysMenuMapper;
import com.zsummer.baikal.system.service.ISysMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * 菜单权限表 服务实现类
 * @author zsummer
 * @since 2021-07-28
 */
@Service
@RequiredArgsConstructor
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements ISysMenuService {

    private final SysMenuMapper sysMenuMapper;

    /**
     * 查询权限
     * @param username
     * @return
     */
    @Override
    public Set<String> findPermissionByUsername(String username) {
        return sysMenuMapper.selectPermissionByUsername(username);
    }
}
